import request from '@/utils/request'

// 查询产品清单列表
export function listItem(query) {
  return request({
    url: '/Sproduct/item/list',
    method: 'get',
    params: query
  })
}

// 查询产品清单详细
export function getItem(sagreementId,sproductId) {
  return request({
    url: '/Sproduct/item/'+ sagreementId+'/' + sproductId,
    method: 'get'
  })
}

// 新增产品清单
export function addItem(data) {
  return request({
    url: '/Sproduct/item',
    method: 'post',
    data: data
  })
}

// 修改产品清单
export function updateItem(data) {
  return request({
    url: '/Sproduct/item',
    method: 'put',
    data: data
  })
}

// 删除产品清单
export function delItem(sproductAnid) {
  return request({
    url: '/Sproduct/item/' + sproductAnid,
    method: 'delete'
  })
}

export function delItem1(sagreementId) {
  return request({
    url: '/Sproduct/item/' + sagreementId,
    method: 'delete'
  })
}
